home *** CD-ROM | disk | FTP | other *** search
- PXFGETGROUPS(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFGGEETTGGRROOUUPPSS - Gets supplementary group IDs
-
- SSYYNNOOPPSSIISS
- SSUUBBRROOUUTTIINNEE PPXXFFGGEETTGGRROOUUPPSS ((_i_g_i_d_s_e_t_s_i_z_e,, _i_g_r_o_u_p_l_i_s_t,, _n_g_r_o_u_p_s,, _i_e_r_r_o_r))
- IINNTTEEGGEERR _i_g_i_d_s_e_t_s_i_z_e,, _i_g_r_o_u_p_l_i_s_t((_i_g_i_d_s_e_t_s_i_z_e)),, _n_g_r_o_u_p_s,, _i_e_r_r_o_r
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The PPXXFFGGEETTGGRROOUUPPSS subroutine uses the ggeettggrroouuppss(2) system call to fill
- _i_g_r_o_u_p_l_i_s_t with a supplemental group list for the calling process.
-
- As a special case, when _i_g_i_d_s_e_t_s_i_z_e is zero, PPXXFFGGEETTGGRROOUUPPSS will return
- the number of supplemental group IDs for the calling process in the
- _n_g_r_o_u_p_s variable, leaving the _i_g_r_o_u_p_l_i_s_t variable unchanged.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this routine:
-
- _i_g_i_d_s_e_t_s_i_z_e
- An input integer variable containing the size of the
- _i_g_r_o_u_p_l_i_s_t integer array.
-
- _i_g_r_o_u_p_l_i_s_t An output integer variable or array element that will
- contain a set of supplemental group IDs for the calling
- process. NNGGRROOUUPPSS__MMAAXX, found in <<ssyyss//ppaarraamm..hh>> for the UNICOS
- operating system and <<uunniissttdd..hh>> for IRIX systems, defines
- the maximum number of supplemental group IDs for a process.
-
- _n_g_r_o_u_p_s An output integer variable that will contain the number of
- supplemental group IDs for the calling process.
-
- _i_e_r_r_o_r An output integer variable that contains zero if the
- variable was changed or nonzero if PPXXFFGGEETTGGRROOUUPPSS was not
- successful.
-
- The PPXXFFGGEETTGGRROOUUPPSS routine may return the EEIINNVVAALL error value if
- _i_g_i_d_s_e_t_s_i_z_e is not equal to zero and is less than the number of
- supplementary group IDs.
-
- EEXXAAMMPPLLEESS
- This example finds the number of supplemental group IDs for its
- process, prints out the number, and then retrieves the supplemental
- group IDs and prints each group ID.
-
- program pxftest
- integer igidgrouplist, igrouplist(64), ngroups, ierror, i
-
- c find out the number of groups
- igidgrouplist = 0
- CALL PXFGETGROUPS(igidgrouplist, igrouplist, ngroups, ierror)
- print *,'groups for process = ',ngroups,' error = ',ierror
-
- c call pxfgetgroups
- igidgrouplist = 64
- CALL PXFGETGROUPS(igidgrouplist, igrouplist, ngroups, ierror)
- print *,'groups for process = ',ngroups,' error = ',ierror
-
- c print out all groups for the process
- do i=1,ngroups
- print *,' gid = ', igrouplist(i)
- enddo
-
- end
-
- This example may return the following results:
-
- groups for process = 2 error = 0
- groups for process = 2 error = 0
- gid = 1013
- gid = 10533
-
- SSEEEE AALLSSOO
- ggeettggrroouuppss(2)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-